<template>
  <div class="install-box">
    <div class="install">
      <span class="iconfont icon-shezhi" @click="dianji()"></span>
    </div>
    <van-cell @click="showPopup" id="van">
      <div class="login" @click="goLogin()">
        <p class="iconfont icon-wode"></p>
        <h2>{{ user || "请登录" }}</h2>
        <!-- <h2>{{ text1 }}</h2> -->
        <span class="iconfont icon-changyongicon-"></span>
      </div>
    </van-cell>
  </div>
</template>

<script>
export default {
  name: "MineInstall",
  data() {
    return {
      show: false,
      text1: "",
    };
  },
  methods: {
    showPopup() {
      this.show = true;
    },
    // goLog() {
    //   this.$router.push("/Log");
    // },
    dianji() {
      this.$router.push("/shezhi");
    },
    goLogin() {
      this.$router.push("/Log");
    },
  },
  computed: {
    // let list = localStorage.getItem("userPhone");
    // this.text1 = list;

    user() {
      if (localStorage.getItem("user") == "") {
        return "点击登录";
      } else {
        return localStorage.getItem("user");
      }
    },
  },
  mounted() {
    console.log(localStorage.getItem("user"));
  },
};
</script>

<style scoped>
@import url(../../assets/font1/iconfont.css);
/* @import url(../../assets/font_3140785_kqxah9f035p/iconfont.css); */

.install-box {
  width: 100%;
  height: 1.4rem;
}
.login .icon-wode {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
}
.install {
  width: 100%;
  height: 0.5rem;
  position: fixed;
  top: 0;
  z-index: 1;
  background-color: #fff;
}
.icon-shezhi {
  float: right;
  font-size: 0.25rem;
  /* padding: 0.4rem 0.16rem 0.2rem 0; */
  box-sizing: border-box;
  margin-top: 0.1rem;
  margin-right: 0.1rem;
}
#van {
  background-color: #fafafa;
}
.login {
  width: 100%;
  height: 0.65rem;
  display: flex;
  line-height: 0.65rem;
  margin-top: 0.5rem;
}
.login p {
  width: 2rem;
  height: 100%;
  /* border-radius: 100%; */
  text-align: center;
  line-height: 0.8rem;
  overflow: hidden;
  background-color: #f5f5f5;
  font-size: 0.4rem;
  color: #d8d8d8;
  margin: 0 0.1rem 0 0.15rem;
}
.login h2 {
  font-size: 0.16rem;
}
.login .icon-changyongicon- {
  width: 0.16rem;
  display: inline-block;
  margin-left: 1.7rem;
  color: #cdcdcd;
  font-size: 0.16rem;
}
.agree p {
  margin: 0.34rem 0 0.2rem 0.6rem;
  font-size: 0.16rem;
  color: #a6a6a6;
}
.agree input {
  margin-left: 0.69rem;
}
.agree label {
  font-size: 0.13rem;
  color: #d1d1d1;

  margin-left: 0.06rem;
}
.agree label a {
  color: #d1d1d1;
  font-size: 0.08rem;
  color: #e8e8e8;
}
</style>